package com.lpit.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 实名认证表
 * @TableName certification
 */
@TableName(value ="certification")
@Data
public class Certification implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 身份证号
     */
    private String idcard;

    /**
     * 认证时间
     */
    private Date certificationDate;

    /**
     * 认证类型
     */
    private String certificationType;

    /**
     * 身份证正面图片
     */
    private String idcardAImg;

    /**
     * 身份证反面图片
     */
    private String idcardBImg;

    /**
     * 认证状态（审核中，驳回，通过）
     */
    private String certificationStatus;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Certification other = (Certification) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
            && (this.getIdcard() == null ? other.getIdcard() == null : this.getIdcard().equals(other.getIdcard()))
            && (this.getCertificationDate() == null ? other.getCertificationDate() == null : this.getCertificationDate().equals(other.getCertificationDate()))
            && (this.getCertificationType() == null ? other.getCertificationType() == null : this.getCertificationType().equals(other.getCertificationType()))
            && (this.getIdcardAImg() == null ? other.getIdcardAImg() == null : this.getIdcardAImg().equals(other.getIdcardAImg()))
            && (this.getIdcardBImg() == null ? other.getIdcardBImg() == null : this.getIdcardBImg().equals(other.getIdcardBImg()))
            && (this.getCertificationStatus() == null ? other.getCertificationStatus() == null : this.getCertificationStatus().equals(other.getCertificationStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
        result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());
        result = prime * result + ((getCertificationDate() == null) ? 0 : getCertificationDate().hashCode());
        result = prime * result + ((getCertificationType() == null) ? 0 : getCertificationType().hashCode());
        result = prime * result + ((getIdcardAImg() == null) ? 0 : getIdcardAImg().hashCode());
        result = prime * result + ((getIdcardBImg() == null) ? 0 : getIdcardBImg().hashCode());
        result = prime * result + ((getCertificationStatus() == null) ? 0 : getCertificationStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", realName=").append(realName);
        sb.append(", idcard=").append(idcard);
        sb.append(", certificationDate=").append(certificationDate);
        sb.append(", certificationType=").append(certificationType);
        sb.append(", idcardAImg=").append(idcardAImg);
        sb.append(", idcardBImg=").append(idcardBImg);
        sb.append(", certificationStatus=").append(certificationStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}